package com.qiankan.qmsj.net;


import com.qiankan.qmsj.entity.Result;

import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;

/**
 * Created by Administrator on 2016/12/24.
 */

public interface BaseServer {
    @FormUrlEncoded
    @POST("customer/api/register")
    Call<Result> userSignIn(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("customer/api/login")
    Call<Result> userLogin(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("customer/api/getvalidate")
    Call<Result> getValidate(@FieldMap Map<String, String> fields);

    @Multipart
    @POST("customer/api/upload")
    Call<Result> upLoadAvatar(@PartMap Map<String, RequestBody> map, @Part MultipartBody.Part file);

    @POST("index")
    Call<Result> getMainFragmentData();

    @POST("product/api/findList")
    Call<Result> getProductForType();

    @FormUrlEncoded
    @POST("product/api/findList")
    Call<Result> getProductForType(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("customer/api/update")
    Call<Result> updateUserInfo(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("application/api/list")
    Call<Result> loanRecord(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("application/api/save")
    Call<Result> reapply(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("discuss/api/add")
    Call<Result> addComment(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("customer/api/getuser")
    Call<Result> getUserInfo(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("product/api/detail")
    Call<Result> getProductDetail(@FieldMap Map<String, String> fields);

    @FormUrlEncoded
    @POST("discuss/api/detail")
    Call<Result> getDiscussDetail(@FieldMap Map<String, String> fields);
}
